﻿using Reviewer.Business.Services;
using Reviewer.Entities.Services;
using Reviewer.Entities;

namespace Reviewer.Business
{
    public static class ServiceFactory
    {
        private static readonly object syncObject = new object();

        public static IGameService GameService { get { return new GameService(); } }

        public static INewsService NewsService { get { return new NewsService(); } }

        public static IWriterService WriterService { get { return new WriterService(); } }

        public static IDistributorService DistributorService { get { return new DistributorService(); } }

        public static IReviewService ReviewService { get { return new ReviewService(); } }

        public static IGameVideoService GameVideoService { get { return new GameVideoService(); } }

        public static IGameViewService GameViewService { get { return new GameViewService(); } }

        public static IGameScreenshotService GameScreenshotService { get { return new GameScreenshotService(); } }

        public static IFrontPagePostService FrontPagePostService { get { return new FontPagePostService(); } }

        public static IFrontPagePostImageService FrontPagePostImageService { get { return new FrontPagePostImageService(); } }

        public static IFrontPageTopService FrontPageTopService { get { return new FrontPageTopService(); } }

        public static INewsletterService NewsletterService { get { return new NewsletterService(); } }

        public static ISystemTextService SystemTextService { get { return new SystemTextService(); } }

        public static IGameAdminService GameAdminService { get { return new GameService(); } }

        public static INewsAdminService NewsAdminService { get { return new NewsService(); } }

        public static IReviewAdminService ReviewAdminService { get { return new ReviewService(); } }

        public static IWriterAdminService WriterAdminService { get { return new WriterService(); } }

        public static IFrontPagePostAdminService FrontPagePostAdminService { get { return new FontPagePostService(); } }

        public static IFrontPagePostImageAdminService FrontPagePostImageAdminService { get { return new FrontPagePostImageService(); } }

        public static IFrontPageTopAdminService FrontPageTopAdminService { get { return new FrontPageTopService(); } }

        public static IMembersAttributeService MembersAttributeService { get { return new MembersAttributeService(); } }

        /// <summary>
        /// Gets the metadata service.
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <returns></returns>
        public static IMetadataService<T> GetMetadataService<T>() where T : class,IMetadataType,new()
        {
            return new MetadataService<T>();
        }
    }
}
